﻿#pragma once

#include "ais_base.h"
#include "geom/geom_point.h"
#include "topo/topo_vertex.h"

namespace CAGD
{

/**
 * 交互点.
 */
class AIS_Point : public AIS_Base
{
  public:
    /**
     * @brief 几何构造.
     * @param point
     * @see
     */
    AIS_Point(Handle(GeomPoint) point);

    /**
     * @brief 基本构造.
     * @param parent
     * @param vertex
     * @see
     */
    AIS_Point(Handle(TopoVertex) vertex);

    /**
     * @brief 检测函数.
     * @return
     * @param pos
     * @see
     */
    bool MoveTo(Point pos) override;

    /**
     * @brief 移动函数.
     * @param pos
     * @see
     */
    bool Move(Point pos) override;

    /**
     * @brief 获得类型.
     * @return
     * @see
     */
    AIS_Type GetType() const override;

    /**
     * @brief 刷新信息.
     * @return
     * @see
     */
    void UpdateInfo() override;

    /**
     * @brief 接收消息.
     * @param mess
     * @see
     */
    void RecvMessage(Message mess) override;

    /**
     * @brief 获得顶点.
     * @return
     * @see
     */
    Handle(TopoVertex) GetVertex() const;

    /**
     * @brief 获得点.
     * @return
     * @see
     */
    Handle(GeomPoint) GetPoint() const;

  protected:
    Handle(TopoVertex) m_vertex;
};

} // namespace CAGD
